package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhPlatformPromiseMapper;
import com.ruoyi.zsyh.domain.ZsyhPlatformPromise;
import com.ruoyi.zsyh.service.IZsyhPlatformPromiseService;
import com.ruoyi.common.core.text.Convert;

/**
 * 服务承诺标签Service业务层处理
 * 
 * @author yuexl
 * @date 2021-12-16
 */
@Service
public class ZsyhPlatformPromiseServiceImpl implements IZsyhPlatformPromiseService 
{
    @Autowired
    private ZsyhPlatformPromiseMapper zsyhPlatformPromiseMapper;

    /**
     * 查询服务承诺标签
     * 
     * @param id 服务承诺标签ID
     * @return 服务承诺标签
     */
    @Override
    public ZsyhPlatformPromise selectZsyhPlatformPromiseById(Long id)
    {
        return zsyhPlatformPromiseMapper.selectZsyhPlatformPromiseById(id);
    }

    /**
     * 查询服务承诺标签列表
     * 
     * @param zsyhPlatformPromise 服务承诺标签
     * @return 服务承诺标签
     */
    @Override
    public List<ZsyhPlatformPromise> selectZsyhPlatformPromiseList(ZsyhPlatformPromise zsyhPlatformPromise)
    {
        return zsyhPlatformPromiseMapper.selectZsyhPlatformPromiseList(zsyhPlatformPromise);
    }

    /**
     * 新增服务承诺标签
     * 
     * @param zsyhPlatformPromise 服务承诺标签
     * @return 结果
     */
    @Override
    public int insertZsyhPlatformPromise(ZsyhPlatformPromise zsyhPlatformPromise)
    {
        zsyhPlatformPromise.setCreateTime(DateUtils.getNowDate());
        return zsyhPlatformPromiseMapper.insertZsyhPlatformPromise(zsyhPlatformPromise);
    }

    /**
     * 修改服务承诺标签
     * 
     * @param zsyhPlatformPromise 服务承诺标签
     * @return 结果
     */
    @Override
    public int updateZsyhPlatformPromise(ZsyhPlatformPromise zsyhPlatformPromise)
    {
        zsyhPlatformPromise.setUpdateTime(DateUtils.getNowDate());
        return zsyhPlatformPromiseMapper.updateZsyhPlatformPromise(zsyhPlatformPromise);
    }

    /**
     * 删除服务承诺标签对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPlatformPromiseByIds(String ids)
    {
        return zsyhPlatformPromiseMapper.deleteZsyhPlatformPromiseByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除服务承诺标签信息
     * 
     * @param id 服务承诺标签ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPlatformPromiseById(Long id)
    {
        return zsyhPlatformPromiseMapper.deleteZsyhPlatformPromiseById(id);
    }
}
